package com.ff.xyh.common.entity.userfront;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.Version;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户收藏表
 * </p>
 *
 * @author ff
 * @since 2022-10-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="UserFavorite对象", description="用户收藏表")
public class UserFavorite implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "收藏者id")
    private String userId;

    @ApiModelProperty(value = "帖子id")
    private String postId;

    @ApiModelProperty(value = "帖子类型")
    private Integer postType;

    @ApiModelProperty(value = "帖子标题 长度小于100")
    private String title;

    @ApiModelProperty(value = "发帖人id")
    private String posterId;

    @ApiModelProperty(value = "发帖人头像")
    private String posterAvatar;

    @ApiModelProperty(value = "发帖人昵称")
    private String posterNickname;

    @ApiModelProperty(value = "帖子状态")
    private Integer postStatus;

    @ApiModelProperty(value = "乐观锁 避免修改已提交(更新丢失)")
    @Version
    private Integer version;

    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreated;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;


}
